# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)


set(SRC_S "")

#add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/lvgl) 

file(GLOB_RECURSE LVGL_SRC ${CMAKE_CURRENT_LIST_DIR}/lvgl/src/*.c)
set(LVGL_INC ${CMAKE_CURRENT_LIST_DIR}/lvgl/src)

list (APPEND PRJ_INC_DIR ${LVGL_INC})
list (APPEND PRJ_SRCS ${LVGL_SRC})

set(AWS_PORT_SRC "")
aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/aws-iot-device-sdk-embedded-C/port AWS_PORT_SRC)
aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/aws-iot-device-sdk-embedded-C/src SRC_S)
list (APPEND SRC_S ${AWS_PORT_SRC})
list (APPEND SRC_S ${CMAKE_CURRENT_LIST_DIR}/aws-iot-device-sdk-embedded-C/external_libs/jsmn/jsmn.c)
list (APPEND PRJ_INC_DIR ${CMAKE_CURRENT_LIST_DIR}/aws-iot-device-sdk-embedded-C/port)
list (APPEND PRJ_INC_DIR ${CMAKE_CURRENT_LIST_DIR}/aws-iot-device-sdk-embedded-C/include)
list (APPEND PRJ_INC_DIR ${CMAKE_CURRENT_LIST_DIR}/aws-iot-device-sdk-embedded-C/external_libs/jsmn)

# set(MBEDTLS_SRC "")
# aux_source_directory(${CMAKE_CURRENT_LIST_DIR}/mbedtls/library MBEDTLS_SRC)
# list (APPEND SRC_S ${MBEDTLS_SRC})
# list (APPEND PRJ_INC_DIR ${CMAKE_CURRENT_LIST_DIR}/mbedtls/include)
# list (APPEND PRJ_INC_DIR ${CMAKE_CURRENT_LIST_DIR}/mbedtls/include/psa)
# list (APPEND PRJ_INC_DIR ${CMAKE_CURRENT_LIST_DIR}/mbedtls/include/mbedtls)

list (APPEND SRC_S ${CMAKE_CURRENT_LIST_DIR}/stateMachine/src/fsm/cynfsm.c)
list (APPEND PRJ_INC_DIR ${CMAKE_CURRENT_LIST_DIR}/stateMachine/src)
list (APPEND PRJ_INC_DIR ${CMAKE_CURRENT_LIST_DIR}/stateMachine/src/fsm)

list (APPEND SRC_S ${CMAKE_CURRENT_LIST_DIR}/CYNOS/CynOS/cynos_list.c)
list (APPEND PRJ_INC_DIR ${CMAKE_CURRENT_LIST_DIR}/CYNOS/CynOS)
list (APPEND PRJ_SRCS ${SRC_S})


set(PRJ_SRCS ${PRJ_SRCS} PARENT_SCOPE)
set(PRJ_INC_DIR ${PRJ_INC_DIR} PARENT_SCOPE)